<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
  <meta charset="UTF-8">
  <title>Новость</title>
  <link rel="stylesheet" th:href="@{/main.css}">
</head>
<body>

<div th:replace="~{layouts/header :: header}"></div>

<main class="container">

  <div id="full_articles_div">
    <img th:src="${fullarticles.img}" id="img" alt="Извините, фото не найдено">
    <h1 th:text="${fullarticles.name}"/>
    <h3 th:text="${fullarticles.description}"/>
    <h6 th:text="${fullarticles.date}"/>
    <div id = "edit-btn-center">
      <form th:action="@{'/articles/' + ${fullarticles.id} + '/delete'}" class="edit-btn" method="post" sec:authorize="hasAuthority('ADMIN') || hasAuthority('DEVELOPER')">
        <button>Удалить</button>
      </form>
      <form th:action="@{'/articles/' + ${fullarticles.id} + '/update'}" class="edit-btn" sec:authorize="hasAuthority('ADMIN') || hasAuthority('DEVELOPER')">
        <button>Редактировать</button>
      </form>
    </div>

  </div>
</main>

<div th:replace="~{layouts/footer :: footer}"></div>

</body>
</html>